package com.jms.fu.model.bo;

import java.util.List;

import com.jms.fu.exception.DAOException;
import com.jms.fu.model.bean.Transaction;
import com.jms.fu.model.dao.TransactionDAO;

public class TransactionBO {
	TransactionDAO transactionDAO ;
	
	public List<Transaction> getAllTransaction() throws DAOException{
		transactionDAO = new TransactionDAO();
		return transactionDAO.getAllTransaction();
	}

	public void changeStatus(String transID) throws DAOException{
		transactionDAO = new TransactionDAO();
		transactionDAO.changeStatus(transID);
		
	}

	public void changeStatus1(String transID) throws DAOException {
		transactionDAO = new TransactionDAO();
		transactionDAO.changeStatus1(transID);
		
	}

	public void addNewTransaction(String username,int appID ,float amount, int status, int type) throws DAOException {
		transactionDAO = new TransactionDAO();
		transactionDAO.addNewTransaction(username,appID,amount,status,type);
		
	}

	public String getBuyAppToChart() throws DAOException {
		transactionDAO = new TransactionDAO();
		return transactionDAO.getBuyAppToChart();
	}

	public String getDepositToChart() throws DAOException {
		transactionDAO = new TransactionDAO();
		return transactionDAO.getDepositToChart();
	}

	public String getRequestMoneyToChart() throws DAOException {
		transactionDAO = new TransactionDAO();
		return transactionDAO.getRequestMoneyToChart();
	}

	public String getTotalDownloadToChart() throws DAOException {
		transactionDAO = new TransactionDAO();
		return transactionDAO.getTotalDownloadToChart();
	}

	public String getTotalUploadToChart() throws DAOException {
		transactionDAO = new TransactionDAO();
		return transactionDAO.getTotalUploadToChart();
	}
	
}
